<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>Android基础--布局文件 | 不忘初心</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="导语  内容: 开发工具+布局文件 开发工具: eclipse">
<meta property="og:type" content="article">
<meta property="og:title" content="Android基础--布局文件">
<meta property="og:url" content="http://example.com/2014/10/13/%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80--%E5%B8%83%E5%B1%80%E6%96%87%E4%BB%B6/index.html">
<meta property="og:site_name" content="不忘初心">
<meta property="og:description" content="导语  内容: 开发工具+布局文件 开发工具: eclipse">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2014-10-13T01:42:58.000Z">
<meta property="article:modified_time" content="2017-07-10T06:57:49.000Z">
<meta property="article:author" content="wxyass">
<meta property="article:tag" content="Android基础">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/atom.xml" title="不忘初心" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/css/style.css">

  
    
<link rel="stylesheet" href="/fancybox/jquery.fancybox.min.css">

  
<meta name="generator" content="Hexo 5.4.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">不忘初心</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://example.com"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-基础/基础--布局文件" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2014/10/13/%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80--%E5%B8%83%E5%B1%80%E6%96%87%E4%BB%B6/" class="article-date">
  <time class="dt-published" datetime="2014-10-13T01:42:58.000Z" itemprop="datePublished">2014-10-13</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Android%E5%9F%BA%E7%A1%80/">Android基础</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="p-name article-title" itemprop="headline name">
      Android基础--布局文件
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h4 id="导语"><a href="#导语" class="headerlink" title="导语"></a>导语</h4><blockquote>
<p> 内容: 开发工具+布局文件<br> 开发工具: eclipse</p>
</blockquote>
<span id="more"></span>  

<p>本节共有<strong>5</strong>点内容:  </p>
<ol start="2">
<li><a href="#er">Android工具介绍</a>;   </li>
<li><a href="#san">配置环境</a>;  </li>
<li><a href="#yi">Android工程基础介绍</a>;  </li>
<li><a href="#si">Android常见布局</a>;  </li>
</ol>
<h2 id="一-Android工具介绍"><a href="#一-Android工具介绍" class="headerlink" title="一 Android工具介绍"></a><a name="er"></a>一 Android工具介绍</h2><blockquote>
<p>Eclipse + ADT 开发工具<br>SDK 开发工具包<br>SDK Manager 开发包管理器  </p>
</blockquote>
<h4 id="1-1-开发工具-Eclipse-ADT-Android-Developer-Tools"><a href="#1-1-开发工具-Eclipse-ADT-Android-Developer-Tools" class="headerlink" title="1.1 开发工具: Eclipse + ADT(Android Developer Tools)"></a>1.1 开发工具: Eclipse + ADT(Android Developer Tools)</h4><ul>
<li>只要下载ADT Bundle即可:   </li>
<li>ADT Bundle包含了Eclipse、ADT插件和SDK Tools，是已经集成好的IDE，只需安装好Jdk即可开始开发，推荐初学者下载ADT Bundle，不用再折腾开发环境。</li>
<li>下载地址: <a target="_blank" rel="noopener" href="http://www.androiddevtools.cn/">http://www.androiddevtools.cn</a>  </li>
</ul>
<h4 id="1-2-开发工具-Android-Studio"><a href="#1-2-开发工具-Android-Studio" class="headerlink" title="1.2 开发工具: Android Studio"></a>1.2 开发工具: Android Studio</h4><ul>
<li>Android Studio是谷歌官方推荐的开发工具,越用越好用</li>
<li>下载地址: <a target="_blank" rel="noopener" href="http://www.androiddevtools.cn/">http://www.androiddevtools.cn</a>  </li>
</ul>
<h4 id="1-3-Android-SDK-软件开发环境-Android调试工具-模拟等"><a href="#1-3-Android-SDK-软件开发环境-Android调试工具-模拟等" class="headerlink" title="1.3 Android SDK (软件开发环境, Android调试工具, 模拟等)"></a>1.3 Android SDK (软件开发环境, Android调试工具, 模拟等)</h4><ul>
<li>默认 <em>Eclipse+ADT</em> 或者 <em>Android Studio</em> 都自带最新Android SDK.</li>
<li>但开发者也可自行下载各个版本的SDK.      </li>
</ul>
<h4 id="1-4-SDK目录"><a href="#1-4-SDK目录" class="headerlink" title="1.4 SDK目录"></a>1.4 SDK目录</h4><ul>
<li>add-ons (额外开发资料, google地图资源)</li>
<li>build-tools : 编译工具目录</li>
<li>docs : 离线版开发文档</li>
<li>extras : 向下兼容的jar包, intel工具</li>
<li>platforms : Android开发版本平台jar包</li>
<li>platform-tools : 平台开发工具(adb)</li>
<li>sources : 开发平台源码</li>
<li>system-images : 模拟器镜像文件</li>
<li>tools : 开发者常用工具  </li>
</ul>
<h2 id="二-环境搭建"><a href="#二-环境搭建" class="headerlink" title="二 环境搭建"></a><a name="san"></a>二 环境搭建</h2><h3 id="2-1-win7需要配置adb环境"><a href="#2-1-win7需要配置adb环境" class="headerlink" title="2.1 win7需要配置adb环境"></a>2.1 win7需要配置adb环境</h3><h4 id="配置-JAVA-HOME"><a href="#配置-JAVA-HOME" class="headerlink" title="配置 JAVA_HOME"></a>配置 JAVA_HOME</h4><ul>
<li>C:\Program Files\Java\jdk1.8.0_101  </li>
</ul>
<h4 id="配置-ANDROID-SDK-HOME"><a href="#配置-ANDROID-SDK-HOME" class="headerlink" title="配置 ANDROID_SDK_HOME"></a>配置 ANDROID_SDK_HOME</h4><ul>
<li>指定一个非中文, 并且没有空格的文件夹</li>
<li>D:\android\develop\adt-bundle-windows-x86_32_20131019\adt-bundle-windows-x86-20131019\sdk\platform-tools  </li>
</ul>
<h4 id="配置PATH"><a href="#配置PATH" class="headerlink" title="配置PATH"></a>配置PATH</h4><ul>
<li>%ANDROID_SDK_HOME%;%JAVA_HOME%\bin;SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files\SinoVoice\jTTS 5.0 Desktop\Bin  </li>
</ul>
<h3 id="2-2-Mac需要下载jdk1-6"><a href="#2-2-Mac需要下载jdk1-6" class="headerlink" title="2.2 Mac需要下载jdk1.6"></a>2.2 Mac需要下载jdk1.6</h3><ul>
<li>当要求下载jdk1.6时,自行百度下载就行</li>
</ul>
<h2 id="三-Android项目基础介绍"><a href="#三-Android项目基础介绍" class="headerlink" title="三 Android项目基础介绍"></a><a name="yi"></a>三 Android项目基础介绍</h2><h3 id="3-1-adb命令介绍-基本用不到"><a href="#3-1-adb命令介绍-基本用不到" class="headerlink" title="3.1 adb命令介绍(基本用不到)"></a>3.1 adb命令介绍(基本用不到)</h3><p>ADB (Android debug bridge) Android调试桥</p>
<ul>
<li><p>adb devices 查看当前已连接的设备</p>
</li>
<li><p>adb start-server 开启 adb 服务</p>
</li>
<li><p>adb kill-server 杀死 adb 服务</p>
</li>
<li><p>adb shell    进入Android控制台(执行Linux命令)exit退出</p>
</li>
<li><p>adb logcat 打印日志信息</p>
</li>
<li><p>adb install xxx.apk : 安装应用</p>
</li>
<li><p>adb uninstall 包名  : 根据包名卸载应用</p>
</li>
<li><p>adb push hiahia.txt /sdcard/hiahia.txt : 上传文件</p>
</li>
<li><p>adb pull /sdcard/hiahia.txt . : 下拉文件</p>
</li>
<li><p>adb -s emulator-5554 :指定设备</p>
</li>
<li><p>adb可能因为360, 金山卫士, 腾讯QQ影响无法使用</p>
</li>
<li><p>端口5037被占用</p>
</li>
<li><p>netstat -ano | find “5037” 查看谁占用端口</p>
</li>
<li><p>杀掉进程kill pid   </p>
</li>
</ul>
<h3 id="3-2-写一个Android项目"><a href="#3-2-写一个Android项目" class="headerlink" title="3.2 写一个Android项目"></a>3.2 写一个Android项目</h3><ol>
<li>创建一个Android Project</li>
<li>写UI界面布局.</li>
<li>根据业务逻辑写Java代码.  </li>
</ol>
<h3 id="3-3-Android项目工程目录结构"><a href="#3-3-Android项目工程目录结构" class="headerlink" title="3.3 Android项目工程目录结构:"></a>3.3 Android项目工程目录结构:</h3><ul>
<li>src: 存放java代码</li>
<li>gen: 存放自动生成文件的. R.java 存放res文件夹下对应资源的id</li>
<li>project.properties: 指定当前工程采用的开发工具包的版本</li>
<li>libs: 当前工程所依赖的jar包.</li>
<li>assets: 放置一些程序所需要的媒体文件.</li>
<li>bin: 工程的编译目录. 存放一些编译时产生的临时文件和当前工程的.apk文件.</li>
<li>res(resources): 资源文件.<ul>
<li>drawable: 存放程序所用的图片.</li>
<li>layout: 存放android的布局文件.</li>
<li>menu: 存放android的OptionsMenu菜单的布局.</li>
<li>values (应用程序所需要的数据. 会在R文件中生成id)<ul>
<li>strings.xml 存放android字符串.</li>
<li>dimens.xml 存放屏幕适配所用到的尺寸.</li>
<li>style.xml 存放android下显示的样式.</li>
</ul>
</li>
<li>values-sw600dp 7寸平板所对应的值</li>
<li>values-sw720dp-land 10寸平板所对应的值</li>
<li>values-v11 指定3.0版本以上的手机显示的样式.</li>
<li>values-v14 指定4.0版本以上的手机显示的样式.</li>
</ul>
</li>
<li>AndroidManifest.xml: android应用程序的入口文件. 声明了android里边的组件. 和相关配置信息.</li>
<li>proguard-project.txt: 加密当前程序所使用.  </li>
</ul>
<h3 id="3-4-启动打包安装过程"><a href="#3-4-启动打包安装过程" class="headerlink" title="3.4 启动打包安装过程"></a>3.4 启动打包安装过程</h3><p>Run as Android Application 后,系统会自动运行下面3点 :  </p>
<ul>
<li>1.生成apk文件.<ul>
<li>1). 生成.dex文件.</li>
<li>2). 资源索引表的生成resources.arsc.</li>
<li>3). 准备未编译文件.</li>
<li>4). 清单文件AndroidMenifest.xml文件转换成二进制.</li>
<li>5). 使用debug.keystore对整个应用程序进行打包签名.</li>
</ul>
</li>
<li>2.加载apk文件到模拟器中.<ul>
<li>把apk文件加载到/data/local/tmp/xxx.apk</li>
</ul>
</li>
<li>3.安装应用程序.<ul>
<li>1). 把/data/local/tmp/xxx.apk文件, 剪切/data/app/包名-1.apk</li>
<li>2). 在/data/data/文件夹下以包名创建一个文件夹, 用于存储当前程序的数据.</li>
<li>3). 在packages.xml和packages.list文件中分别添加一条记录.  </li>
</ul>
</li>
</ul>
<h3 id="3-5-如何在手机上运行Android项目"><a href="#3-5-如何在手机上运行Android项目" class="headerlink" title="3.5 如何在手机上运行Android项目"></a>3.5 如何在手机上运行Android项目</h3><ol>
<li>买根数据线</li>
<li>插上电脑</li>
<li>装驱动(驱动精灵,驱动人生,应用宝,360手机卫士)</li>
<li>开启usb调试模式  </li>
</ol>
<h3 id="3-6-R文件报错处理"><a href="#3-6-R文件报错处理" class="headerlink" title="3.6 R文件报错处理:"></a>3.6 R文件报错处理:</h3><ol>
<li>不能以关键字命名</li>
<li>资源不能以数字开头</li>
<li>布局文件内部有错误, 有小红叉  </li>
</ol>
<h3 id="3-7-点击事件的4种写法"><a href="#3-7-点击事件的4种写法" class="headerlink" title="3.7 点击事件的4种写法"></a>3.7 点击事件的4种写法</h3><ol>
<li>定义一个内部类实现OnClickListener接口</li>
<li>使用匿名内部类对象实现</li>
<li>使用当前类,继承接口</li>
<li>定义xml属性<ul>
<li>定义xml的属性android:onClick=”call”</li>
<li>在代码里写方法 public void call(View view){}  </li>
</ul>
</li>
</ol>
<h3 id="3-8-短信发送器"><a href="#3-8-短信发送器" class="headerlink" title="3.8 短信发送器"></a>3.8 短信发送器</h3><ol>
<li>拿到联系人电话号码</li>
<li>群发短信  </li>
</ol>
<h3 id="3-9-Android的颜色模式"><a href="#3-9-Android的颜色模式" class="headerlink" title="3.9 Android的颜色模式"></a>3.9 Android的颜色模式</h3><p>RGB (Red, Green, Blue) #FF0000</p>
<h3 id="3-10-控件"><a href="#3-10-控件" class="headerlink" title="3.10 控件"></a>3.10 控件</h3><ul>
<li>显示文本的控件  TextView</li>
<li>输入框控件      EditText</li>
<li>按钮控件     Button</li>
</ul>
<h3 id="3-11-Android中的显示单位"><a href="#3-11-Android中的显示单位" class="headerlink" title="3.11 Android中的显示单位"></a>3.11 Android中的显示单位</h3><ul>
<li><p>px (pixels)像素 </p>
<ul>
<li>一般HVGA代表320x480像素。该单位不常用. 机顶盒开发可能用.</li>
</ul>
</li>
<li><p>dip或dp (device independent pixels)设备独立像素</p>
<ul>
<li>这个和设备硬件有关，一般为了支持WVGA、HVGA和QVGA 推荐使用这个，不依赖像素。</li>
</ul>
</li>
<li><p>sp (scaled pixels — best for text size)比例像素</p>
<ul>
<li>主要处理字体的大小，可以根据用户系统的字体自适应。</li>
</ul>
</li>
<li><p>除了上面三个显示单位，下面还有几个不太常用：</p>
<ul>
<li>in (inches)英寸</li>
<li>mm (millimeters)毫米  </li>
<li>pt (points)点，1/72英寸</li>
</ul>
</li>
<li><p>为了适应不同分辨率，不同的像素密度，推荐使用dip ，文字使用sp。  </p>
</li>
</ul>
<h2 id="四-Android常见布局"><a href="#四-Android常见布局" class="headerlink" title="四 Android常见布局"></a><a name="si"></a>四 Android常见布局</h2><blockquote>
<p>LinearLayout<br>RelativeLayout<br>FrameLayout<br>AbsoluteLayout<br>TableLayout   </p>
</blockquote>
<h3 id="LinearLayout-线性布局"><a href="#LinearLayout-线性布局" class="headerlink" title="LinearLayout    线性布局"></a>LinearLayout    线性布局</h3><pre><code>- 控件一个接一个排列
    - 属性参数
    - android:orientation=&quot;vertical&quot;垂直排列
    - android:layout_width=&quot;match_parent&quot; 填充父窗体
    - android:layout_height=&quot;wrap_content&quot;包裹内容
* orientation 属性是**指定线性布局的排列方向**: 
    - horizontal 水平
    - vertical 垂直
* gravity属性是**指定当前控件内容显示位置**: 
    - left 左边
    - right 右边
    - top 上边
    - bottom 底边
* layout_gravity属性是**指定当前控件在父元素的位置**: 
    - left 左边
    - right 右边
    - top 上边
    - bottom 底边
* layout_weightSum(权重)属性是**把线性布局中剩余空间分成N份**.
* layout_weight (权重)属性是**指定当前控件在父元素(线性布局)中占N份**.
* visibility属性是**控制布局是否显示**: 
    - visible 显示
    - invisible 不显示但占空间
    - gone 隐藏  
</code></pre>
<h3 id="RelativeLayout-相对布局"><a href="#RelativeLayout-相对布局" class="headerlink" title="RelativeLayout    相对布局"></a>RelativeLayout    相对布局</h3><pre><code>- 控件之间以相对位置排列
- android:layout_toRightOf        在指定控件的右边
- android:layout_toLeftOf        在指定控件的左边
- android:layout_above        在指定控件的上边
- android:layout_below        在指定控件的下边
- android:layout_alignBaseline        跟指定控件水平对齐
- android:layout_alignLeft        跟指定控件左对齐
- android:layout_alignRight        跟指定控件右对齐
- android:layout_alignTop        跟指定控件顶部对齐
- android:layout_alignBottom        跟指定控件底部对齐
- android:layout_alignParentLeft    是否跟父布局左对齐
- android:layout_alignParentTop    是否跟父布局顶部对齐
- android:layout_alignParentRight    是否跟父布局右对齐
- android:layout_alignParentBottom    是否跟父布局底部对齐
- android:layout_centerVertical    在父布局中垂直居中
- android:layout_centerHorizontal    在父布局中水平居中
- android:layout_centerInParent    在父布局中居中
- android:layout_marginRight 距离指定父控件的外边距
</code></pre>
<h3 id="FrameLayout-帧布局"><a href="#FrameLayout-帧布局" class="headerlink" title="FrameLayout    帧布局"></a>FrameLayout    帧布局</h3><pre><code>- 一层盖一层
- 帧布局每次添加的控件都显示在最上面，最后显示在界面上的是最后添加的一个控件
</code></pre>
<h3 id="AbsoluteLayout-绝对布局"><a href="#AbsoluteLayout-绝对布局" class="headerlink" title="AbsoluteLayout    绝对布局"></a>AbsoluteLayout    绝对布局</h3><pre><code>- 通过x, y指定绝对位置. 
- android:layout_x    指定控件在父布局的x轴坐标
- android:layout_y    指定控件在父布局的y轴坐标
</code></pre>
<h3 id="TableLayout-表格布局"><a href="#TableLayout-表格布局" class="headerlink" title="TableLayout        表格布局"></a>TableLayout        表格布局</h3><pre><code>- 类似Html表格
- android:shrinkColumns        收缩列
- android:stretchColumns        拉伸列
- android:collapseColumns        隐藏列
- android:layout_column        指定列(作用在列的身上)
- android:layout_span            合并列(作用在列的身上)

- TableRow单元行里的单元格的宽度小于默认的宽度时就不起作用,其默认是fill_parent，高度可以自定义大小  
</code></pre>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2014/10/13/%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80--%E5%B8%83%E5%B1%80%E6%96%87%E4%BB%B6/" data-id="ckvc340qt00675dfy7myk6ds5" data-title="Android基础--布局文件" class="article-share-link">Share</a>
      
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Android%E5%9F%BA%E7%A1%80/" rel="tag">Android基础</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2014/10/13/%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80--%E6%95%B0%E6%8D%AE%E5%AD%98%E5%82%A8/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Android基础--数据存储
        
      </div>
    </a>
  
  
    <a href="/2014/04/26/Activity/Activity--Activity%E4%B9%8B%E9%97%B4%E6%95%B0%E6%8D%AE%E4%BC%A0%E9%80%92/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Activity-Activity之间数据传递</div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Activity/">Activity</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-Studio%E4%BB%8B%E7%BB%8D/">Android Studio介绍</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android%E5%9F%BA%E7%A1%80/">Android基础</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android%E6%A8%A1%E6%9D%BF/">Android模板</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/BaseRecyclerViewAdapterHelper/">BaseRecyclerViewAdapterHelper</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Bug%E9%97%AE%E9%A2%98/">Bug问题</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Button/">Button</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/EditText/">EditText</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Fragment/">Fragment</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Gradle/">Gradle</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/ListView/">ListView</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/MD%E8%AF%AD%E6%B3%95/">MD语法</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/MyEclipse/">MyEclipse</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/OSS/">OSS</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/RecyclerView/">RecyclerView</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/SQL%E5%9F%BA%E7%A1%80/">SQL基础</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/UI%E6%8E%A7%E4%BB%B6/">UI控件</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/View/">View</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/ViewPager/">ViewPager</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/View%E7%AF%87/">View篇</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/as%E6%8A%A5%E9%94%99/">as报错</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/jar%E5%8C%85/">jar包</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/targetSdkVersion/">targetSdkVersion</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E4%B8%83%E7%89%9B%E4%BA%91/">七牛云</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E4%BA%8C%E7%BB%B4%E7%A0%81/">二维码</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%88%A0%E9%99%A4%E5%9B%BE%E7%89%87%E7%BC%93%E5%AD%98/">删除图片缓存</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%8D%87%E7%BA%A7%E6%8A%A5%E9%94%99/">升级报错</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/">博客搭建</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%8E%BB%E6%8E%89v7%E5%8C%85/">去掉v7包</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%9B%BE%E7%89%87%E5%A4%84%E7%90%86/">图片处理</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%A4%9A%E5%AA%92%E4%BD%93/">多媒体</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%AE%9A%E5%88%B6%E7%B1%BB/">定制类</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%B0%8F%E7%B1%B3%E6%89%8B%E6%9C%BA/">小米手机</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%B9%BF%E6%92%AD%E6%9C%BA%E5%88%B6/">广播机制</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%BE%AE%E5%8D%9A%E5%88%86%E4%BA%AB/">微博分享</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E6%89%93%E5%8C%85APK%E6%8A%A5%E9%94%99/">打包APK报错</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E6%8C%81%E4%B9%85%E5%8C%96%E5%AD%98%E5%82%A8/">持久化存储</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E6%97%B6%E9%97%B4%E9%80%89%E6%8B%A9DatePicker/">时间选择DatePicker</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E6%9C%8D%E5%8A%A1/">服务</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E6%9D%83%E9%99%90/">权限</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E6%9E%84%E5%BB%BA%E5%9F%BA%E7%B1%BB/">构建基类</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E6%B5%8B%E8%AF%95/">测试</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E7%9B%91%E5%90%AC%E9%94%81%E5%B1%8F/">监听锁屏</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E7%B3%BB%E7%BB%9F%E9%A1%B5%E9%9D%A2%E8%B7%B3%E8%BD%AC/">系统页面跳转</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E8%89%BA%E6%9C%AF%E6%8E%A2%E7%B4%A2/">艺术探索</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E8%AF%BB%E5%8F%96txt/">读取txt</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E8%BE%93%E5%85%A5%E6%B3%95/">输入法</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E9%9F%B3%E4%B9%90%E6%92%AD%E6%94%BE%E5%99%A8/">音乐播放器</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E9%BB%91%E9%A9%AC%E5%8D%AB%E5%A3%AB/">黑马卫士</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Activity/" rel="tag">Activity</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Android-Studio/" rel="tag">Android Studio</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Android-Studio%E4%BB%8B%E7%BB%8D/" rel="tag">Android Studio介绍</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Android%E5%9F%BA%E7%A1%80/" rel="tag">Android基础</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Android%E6%A8%A1%E6%9D%BF/" rel="tag">Android模板</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/BaseRecyclerViewAdapterHelper/" rel="tag">BaseRecyclerViewAdapterHelper</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Bug%E9%97%AE%E9%A2%98/" rel="tag">Bug问题</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Button/" rel="tag">Button</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/EditText/" rel="tag">EditText</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Fragment/" rel="tag">Fragment</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Gradle/" rel="tag">Gradle</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ListView/" rel="tag">ListView</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/MD%E8%AF%AD%E6%B3%95/" rel="tag">MD语法</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/MyEclipse/" rel="tag">MyEclipse</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/OSS/" rel="tag">OSS</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/RecyclerView/" rel="tag">RecyclerView</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/SQL%E5%9F%BA%E7%A1%80/" rel="tag">SQL基础</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/UI%E6%8E%A7%E4%BB%B6/" rel="tag">UI控件</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/View/" rel="tag">View</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ViewPager/" rel="tag">ViewPager</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/View%E7%AF%87/" rel="tag">View篇</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/as%E6%8A%A5%E9%94%99/" rel="tag">as报错</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/jar%E5%8C%85/" rel="tag">jar包</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/targetSdkVersion/" rel="tag">targetSdkVersion</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E4%B8%83%E7%89%9B%E4%BA%91/" rel="tag">七牛云</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%8D%87%E7%BA%A7%E6%8A%A5%E9%94%99/" rel="tag">升级报错</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" rel="tag">博客搭建</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%9B%BE%E7%89%87%E5%A4%84%E7%90%86/" rel="tag">图片处理</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%A4%9A%E5%AA%92%E4%BD%93/" rel="tag">多媒体</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%B7%A5%E4%BD%9C%E9%97%AE%E9%A2%98/" rel="tag">工作问题</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%B9%BF%E6%92%AD%E6%9C%BA%E5%88%B6/" rel="tag">广播机制</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%BA%94%E7%94%A8%E8%AF%A6%E6%83%85/" rel="tag">应用详情</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%BE%AE%E5%8D%9A%E5%88%86%E4%BA%AB/" rel="tag">微博分享</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%8C%81%E4%B9%85%E5%8C%96%E5%AD%98%E5%82%A8/" rel="tag">持久化存储</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%9C%8D%E5%8A%A1/" rel="tag">服务</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%9D%83%E9%99%90/" rel="tag">权限</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%9E%84%E5%BB%BA%E5%9F%BA%E7%B1%BB/" rel="tag">构建基类</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%94%9F%E6%B4%BB/" rel="tag">生活</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%BB%83%E6%89%8B/" rel="tag">练手</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%89%BA%E6%9C%AF%E6%8E%A2%E7%B4%A2/" rel="tag">艺术探索</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%BE%93%E5%85%A5%E6%B3%95/" rel="tag">输入法</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E9%AB%98%E7%BA%A7%E6%8A%80%E5%B7%A7/" rel="tag">高级技巧</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/Activity/" style="font-size: 12.5px;">Activity</a> <a href="/tags/Android-Studio/" style="font-size: 10px;">Android Studio</a> <a href="/tags/Android-Studio%E4%BB%8B%E7%BB%8D/" style="font-size: 12.5px;">Android Studio介绍</a> <a href="/tags/Android%E5%9F%BA%E7%A1%80/" style="font-size: 20px;">Android基础</a> <a href="/tags/Android%E6%A8%A1%E6%9D%BF/" style="font-size: 10px;">Android模板</a> <a href="/tags/BaseRecyclerViewAdapterHelper/" style="font-size: 10px;">BaseRecyclerViewAdapterHelper</a> <a href="/tags/Bug%E9%97%AE%E9%A2%98/" style="font-size: 10px;">Bug问题</a> <a href="/tags/Button/" style="font-size: 10px;">Button</a> <a href="/tags/EditText/" style="font-size: 10px;">EditText</a> <a href="/tags/Fragment/" style="font-size: 18.75px;">Fragment</a> <a href="/tags/Gradle/" style="font-size: 10px;">Gradle</a> <a href="/tags/ListView/" style="font-size: 17.5px;">ListView</a> <a href="/tags/MD%E8%AF%AD%E6%B3%95/" style="font-size: 11.25px;">MD语法</a> <a href="/tags/MyEclipse/" style="font-size: 13.75px;">MyEclipse</a> <a href="/tags/OSS/" style="font-size: 11.25px;">OSS</a> <a href="/tags/RecyclerView/" style="font-size: 12.5px;">RecyclerView</a> <a href="/tags/SQL%E5%9F%BA%E7%A1%80/" style="font-size: 10px;">SQL基础</a> <a href="/tags/UI%E6%8E%A7%E4%BB%B6/" style="font-size: 15px;">UI控件</a> <a href="/tags/View/" style="font-size: 10px;">View</a> <a href="/tags/ViewPager/" style="font-size: 10px;">ViewPager</a> <a href="/tags/View%E7%AF%87/" style="font-size: 10px;">View篇</a> <a href="/tags/as%E6%8A%A5%E9%94%99/" style="font-size: 10px;">as报错</a> <a href="/tags/jar%E5%8C%85/" style="font-size: 10px;">jar包</a> <a href="/tags/targetSdkVersion/" style="font-size: 10px;">targetSdkVersion</a> <a href="/tags/%E4%B8%83%E7%89%9B%E4%BA%91/" style="font-size: 10px;">七牛云</a> <a href="/tags/%E5%8D%87%E7%BA%A7%E6%8A%A5%E9%94%99/" style="font-size: 10px;">升级报错</a> <a href="/tags/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" style="font-size: 12.5px;">博客搭建</a> <a href="/tags/%E5%9B%BE%E7%89%87%E5%A4%84%E7%90%86/" style="font-size: 15px;">图片处理</a> <a href="/tags/%E5%A4%9A%E5%AA%92%E4%BD%93/" style="font-size: 12.5px;">多媒体</a> <a href="/tags/%E5%B7%A5%E4%BD%9C%E9%97%AE%E9%A2%98/" style="font-size: 16.25px;">工作问题</a> <a href="/tags/%E5%B9%BF%E6%92%AD%E6%9C%BA%E5%88%B6/" style="font-size: 12.5px;">广播机制</a> <a href="/tags/%E5%BA%94%E7%94%A8%E8%AF%A6%E6%83%85/" style="font-size: 10px;">应用详情</a> <a href="/tags/%E5%BE%AE%E5%8D%9A%E5%88%86%E4%BA%AB/" style="font-size: 10px;">微博分享</a> <a href="/tags/%E6%8C%81%E4%B9%85%E5%8C%96%E5%AD%98%E5%82%A8/" style="font-size: 13.75px;">持久化存储</a> <a href="/tags/%E6%9C%8D%E5%8A%A1/" style="font-size: 12.5px;">服务</a> <a href="/tags/%E6%9D%83%E9%99%90/" style="font-size: 10px;">权限</a> <a href="/tags/%E6%9E%84%E5%BB%BA%E5%9F%BA%E7%B1%BB/" style="font-size: 10px;">构建基类</a> <a href="/tags/%E7%94%9F%E6%B4%BB/" style="font-size: 11.25px;">生活</a> <a href="/tags/%E7%BB%83%E6%89%8B/" style="font-size: 11.25px;">练手</a> <a href="/tags/%E8%89%BA%E6%9C%AF%E6%8E%A2%E7%B4%A2/" style="font-size: 10px;">艺术探索</a> <a href="/tags/%E8%BE%93%E5%85%A5%E6%B3%95/" style="font-size: 10px;">输入法</a> <a href="/tags/%E9%AB%98%E7%BA%A7%E6%8A%80%E5%B7%A7/" style="font-size: 11.25px;">高级技巧</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/11/">November 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/10/">October 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/09/">September 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/08/">August 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/07/">July 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/06/">June 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/04/">April 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/03/">March 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/02/">February 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/09/">September 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/10/">October 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/04/">April 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/01/">January 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/05/">May 2012</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2017/11/03/Android%20Studio/Github%E4%B8%8A%E6%8F%90%E4%BA%A4%E4%BB%A3%E7%A0%81/">Github上提交代码</a>
          </li>
        
          <li>
            <a href="/2017/10/31/RecyclerView/BaseRecyclerViewAdapterHelper%E5%BA%93%E7%9A%84%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95/">BaseRecyclerViewAdapterHelper库的基本使用方法</a>
          </li>
        
          <li>
            <a href="/2017/10/31/%E5%9B%BE%E7%89%87%E5%A4%84%E7%90%86/%E4%B8%83%E7%89%9B%E4%BA%91--%E4%B8%83%E7%89%9B%E4%BA%91%E5%BF%AB%E9%80%9F%E4%B8%8A%E4%BC%A0%E5%9B%BE%E7%89%87/">七牛云快速上传图片</a>
          </li>
        
          <li>
            <a href="/2017/10/31/Gradle/Gradle--Gradle%E6%B7%BB%E5%8A%A0%E7%AC%AC%E4%B8%89%E6%96%B9%E5%BA%93%E6%8A%A5%E5%BC%82%E5%B8%B8/">Gradle添加第三方库报异常</a>
          </li>
        
          <li>
            <a href="/2017/10/26/Android%20Studio/%E8%A7%A3%E5%86%B3Android-Studio-Gradle-%E9%94%99%E8%AF%AF-%E7%BC%96%E7%A0%81GBK%E7%9A%84%E4%B8%8D%E5%8F%AF%E6%98%A0%E5%B0%84%E5%AD%97%E7%AC%A6/">解决Android Studio Gradle 错误 编码GBK的不可映射字符</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2021 wxyass<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/js/jquery-3.4.1.min.js"></script>



  
<script src="/fancybox/jquery.fancybox.min.js"></script>




<script src="/js/script.js"></script>





  </div>
</body>
</html>